home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d576 / termii.lha / TermII / English / ARexx Examples / download.rexx next >
OS/2 REXX Batch file  |  1991-12-22  |  4KB  |  78 lines

  1. /*                                                                      */
  2. /*  download.rexx                                                       */
  3. /*                                                                      */
  4. /*          This ARexx program can be used for automatic                */
  5. /*          download from Calvacom                                      */
  6. /*                                                                      */
  7. /*                                                                      */
  8. /*  SYNTAX :                                                            */
  9. /*                                                                      */
  10. /*      rx download CITE/BIB/SECTION/PROGRAMME file                     */
  11. /*                                                                      */
  12. /*                                                                      */
  13. /*  EXAMPLES :                                                          */
  14. /*                                                                      */
  15. /*      - Download dme.zip from AMIGA CITY in BIB AMIGA, section        */
  16. /*        UTILITIES, and save it as dh0:calva/new_dme.zip               */
  17. /*                                                                      */
  18. /*          rx download amiga/amiga/utilitaires/dme.zip dh0:calva/new_dme.zip */
  19. /*                                                                      */
  20. /*      - Downloading FOO from MAC City, SECTION INIT                   */
  21. /*        (there is not sub-section in Cité Mac !!!)                    */
  22. /*                                                                      */
  23. /*          rx download mac//init/foo ram:foo.mac                       */
  24. /*                                                                      */
  25. /*                                                                      */
  26. /*  BUGS :                                                              */
  27. /*                                                                      */
  28. /*      There are no tests on the answers returned by Calva or by       */
  29. /*      the modem. To be safe, memory should be used, and values        */
  30. /*      found in this variable should be tested                         */
  31. /*                                                                      */
  32. /*                                                                      */
  33. /*  NOTES :                                                             */
  34. /*                                                                      */
  35. /*      We could have starte with "console_close", this would have      */
  36. /*      closed the console window, though speeding up the script        */
  37. /*      (there would have been nothing to print on the screen)          */
  38.  
  39. arg cite '/' bib '/' section '/' programme ' ' fichier
  40.  
  41.   say "cite = " cite
  42.   say "bib = " bib
  43.   say "section = " section
  44.   say "programme = " programme
  45.   say "fichier = " fichier
  46.  
  47.   address TERM
  48.  
  49.     serial_send '"ATDT16143061111\n"'
  50.     rexx_delay 5; rexx_wait 30 1
  51.     rexx_wait 5 1
  52.     serial_send '"eg19\n"'
  53.     rexx_wait 5 1
  54.     serial_send '"password\n"'
  55.     rexx_wait 5 1
  56.     serial_send '"'"CI" cite"\n"'"'
  57.     rexx_wait 5 1
  58.     serial_send '"'"BIB" bib"\n"'"'
  59.     rexx_wait 5 1
  60.     serial_send '"'section"\n"'"'
  61.     rexx_wait 5 1
  62.     xpr_open '"xprxmodem.library"'
  63.     xpr_init '"T0,C0,K1"'
  64.     serial_send '"'"im" programme"\n"'"'
  65.     rexx_wait 5 1
  66.     serial_send '"Y\n"'
  67.     rexx_wait 5 1
  68.     xpr_receive '"'fichier'"'
  69.     serial_send '"!!\n"'
  70.     rexx_delay 2
  71.     serial_send '"!!\n"'
  72.     rexx_wait 5 1
  73.     serial_send '"+++"'
  74.     rexx_delay 1
  75.     serial_send '"ATH\n"'
  76.  
  77.  
  78.